home *** CD-ROM | disk | FTP | other *** search
- Path: ida.his.se!usenet
- From: Stefan 'Stetson' Skoglund <sp2stes1@ida.his.se>
- Newsgroups: comp.lang.c,gnu.gcc.help,comp.unix.programmer
- Subject: Re: Help for using bcopy function
- Date: 12 Mar 1996 12:57:35 +0100
- Organization: University of Skoevde, Skoevde Sweden
- Sender: sp2stes1@ernst.ida.his.se
- Message-ID: <y9yspfe5xsg.fsf@ernst.ida.his.se>
- References: <4gl53u$4bv@kocrsv08.delcoelect.com>
- <ELIAS.96Feb27144032@cepheus.omicron.se>
- <31372F78.167EB0E7@pia.bt.co.uk> <y9ybumcc5i0.fsf@ernst.ida.his.se>
- <4hhntlINNr3k@keats.ugrad.cs.ubc.ca>
- Reply-To: Stefan 'Stetson' Skoglund <sp2stes1@ida.his.se>
- NNTP-Posting-Host: ernst.ida.his.se
- In-reply-to: c2a192@ugrad.cs.ubc.ca's message of 5 Mar 1996 07:51:17 -0800
- X-Newsreader: Gnus v5.1
-
-
- >>>>> "Kazimir" == Kazimir Kylheku <c2a192@ugrad.cs.ubc.ca> writes:
-
- Kazimir> SunOS 2.4? Man, that is ancient. (Or you surely mean
- Kazimir> _Solaris_ 2.4?)
-
- I was thinking about SunsOS 5.4 yes.
-
- Kazimir> bcopy() is frequently used to copy an array of four
- Kazimir> characters representing an inet address (derived from the
- Kazimir> struct hostent structure which comes from
- Kazimir> gethostbyname()) over top of a struct in_addr (part of a
- Kazimir> struct sockaddr_in), which holds an unsigned int. It's
- Kazimir> ugly, but go figure. :) --
-
- I usually use a number of casts and one assignment, no bcopy.
- Either way I would still use mem{cpy|move}. By the way :
- the socket routines on sunos 5.4 is in /usr/lib/libsocket.so.
- /usr/ucblib/* is purely bsd compatibility.
- --
- ---------------------------------------------------------------------
- Stefan 'Stetson' Skoglund I |
- sp2stes1@ida.his.se I |
- <http://www.his.se/ida/~sp2stes1/> I _____/0\_____
- I ____________O(.)O___________
- H\"ogskolan i Sk\"ovde, Sverige I I-+-I O I-+-I
- I
- I Viggen with two Rb04
- ---------------------------------------------------------------------
-